package com.mingtai.design.pattern.creationalming.factorymethod;

/**
 * @description: 工厂方法
 * @author: mingtai
 * @createDate: 23:15 2021/1/8
 * @version: 1.0
 */

public class Test {
    public static void main(String[] args) {
        VideoFactory videoFactory = new JavaVideoFactory();
        Video video = videoFactory.getVideo();
        video.produce();

        // 修改对应工厂，即可产生对应video
        // VideoFactory videoFactory = new PythonVideoFactory();
        // Video video = videoFactory.getVideo();
        // video.produce();
    }
}



